package team.hyznrj.studentsys.entity;

import lombok.Data;
import lombok.ToString;
import team.hyznrj.studentsys.service.impl.StaticDatabasesValueCache;

@Data
@ToString
public class CourseDetailEntity extends StudentBasicMessage {
	/**成绩编号*/
    private String id;
    /**科目*/
    private String courseTitle;
    /**学分*/
    private Double courseCredit;
    /**备注*/
    private String remarks;
    /**折算成绩*/
    private Double convertMark;
    /**折算绩点*/
    private Double courseGradePoint;
    /**科目类型*/
    private String curriculumNature;
    /**年份*/
    private String academicYear;
    /**学期*/
    private Integer item;
    
    public void setMBG_CourseAchievement(MBG_CourseAchievement course,StaticDatabasesValueCache cache){
    	this.id=course.getId();
    	this.courseTitle=course.getCourseTitle();
    	this.courseCredit=course.getCourseCredit().doubleValue();
    	this.remarks=course.getRemarks();
    	this.convertMark=course.getConvertMark().doubleValue();
    	this.courseGradePoint=course.getCourseGradePoint().doubleValue();
    	this.item=course.getSchoolTerm();
    	this.academicYear=cache.getYearById(course.getAcademicYear());
    	this.curriculumNature=cache.getCurriculumNatureValueById(course.getCurriculumNature());
    }
}
